package com.learn.ert.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.learn.ert.base.BaseApiService;
import com.learn.ert.base.BaseResponse;
import com.learn.ert.mapper.ErResourceMapper;
import com.learn.ert.service.ErResourceService;
import com.learn.ert.utils.HttpUtils;
import com.learn.ert.utils.PageUtils;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * 
 *
 * @author sjf
 * @email 2334593702@qq.com
 * @date 2020-08-14 17:47:02
 */
@RestController
@RequestMapping("api/erresource")
@Api(tags = "资源信息接口")
public class ErResourceController {
    @Autowired
    private ErResourceService erResourceService;

   /* *//**
     * 列表
     *//*
    @RequestMapping("/list")
  //  @RequiresPermissions("api:erresource:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = erResourceMapper.queryPage(params);

        return R.ok().put("page", page);
    }


    *//**
     * 信息
     *//*
    @RequestMapping("/info/{rId}")
   // @RequiresPermissions("api:erresource:info")
    public R info(@PathVariable("rId") Integer rId){
		ErResourceEntity erResource = erResourceMapper.selectById(rId);

        return R.ok().put("erResource", erResource);
    }

    *//**
     * 保存
     *//*
    @RequestMapping("/save")
   // @RequiresPermissions("api:erresource:save")
    public R save(@RequestBody ErResourceEntity erResource){
		erResourceMapper.insert(erResource);

        return R.ok();
    }

    *//**
     * 修改
     *//*
    @RequestMapping("/update")
    //@RequiresPermissions("api:erresource:update")
    public R update(@RequestBody ErResourceEntity erResource){
		erResourceMapper.updateById(erResource);

        return R.ok();
    }

    *//**
     * 删除
     *//*
//    @RequestMapping("/delete")
//    //@RequiresPermissions("api:erresource:delete")
//    public R delete(@RequestBody Integer[] rIds){
//		erResourceMapper.removeByIds(Arrays.asList(rIds));
//
//        return R.ok();
//    }
*/
}
